package com.jiuli.liping.controller;

import com.jiuli.liping.service.HrService;
import com.jiuli.liping.test.MyAsyncTask;
import com.jiuli.liping.vo.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 岗位职责书在线签署功能模块
 */
@CrossOrigin
@RestController
@RequestMapping(value = "/hr")
public class HrController {
    @Autowired
    private HrService hrService;

    @RequestMapping(value = {"/sendWechat", ""}, method = RequestMethod.POST)
    public void sendWechat(@RequestBody HrDto hrDto){
        hrService.sendWechat(hrDto);
    }

    @RequestMapping(value = {"/getList", ""}, method = RequestMethod.GET)
    public List<HrVo> getList(String userCode){
      return  hrService.getList(userCode);
    }

    @RequestMapping(value = {"/pdf", ""}, method = RequestMethod.GET)
    public ReturnMsg test(String id){
      return  hrService.test(id);
    }

    @RequestMapping(value = "/delete", method = RequestMethod.GET)
    public ReturnMsg delete( String workCode) {
        return hrService.delete(workCode);
    }
}
